package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.ScheduleRecordDto;
import edu.suda.xsap.entity.ScheduleRecord;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ScheduleRecordConvert {
    @Mapping(source="id", target = "id")
    @Mapping(source="courseId", target = "courseId")
    @Mapping(source="teacherId", target = "teacherId")
    @Mapping(source="orderNums", target = "orderNums")
    @Mapping(source="startTime", target = "startTime")
    @Mapping(source="classTime", target = "classTime")
    ScheduleRecordDto toDto(ScheduleRecord scheduleRecord);

    List<ScheduleRecordDto> toDtoList(List<ScheduleRecord> scheduleRecords);
}
